#ifndef PACKET_OBJECTSPAWN_H
#define PACKET_OBJECTSPAWN_H
#include "Packet.h"
#include "GameObject.h"

class PacketObjectSpawn : public Packet
{
public:
	PacketObjectSpawn(void);
	PacketObjectSpawn(Buffer& buffer);
	PacketObjectSpawn(long long objectID, OBJECT_TYPE type, Position& pos, long long ownerID = 0, long long sourceID = 0, long long targetID = 0);
	~PacketObjectSpawn(void);

	virtual int Write(void* buffer);
	virtual void Read(Buffer& buffer);



	OBJECT_TYPE GetObjectType(void) const;
	Position& GetPosition(void);
	long long GetOwnerID(void) const;
	long long GetObjectID(void) const;

private:
	//long long	m_objectID;  should not be needed

	long long	m_objectID;
	Position	m_position;
	OBJECT_TYPE m_objectType;

	// Projectile only
	long long	m_ownerID;

	// Beam only
	long long	m_sourceID;
	long long	m_targetID;
};
#endif